import React from "react";
import ReactDom from "react-dom";
import {Provider} from "react-redux";
import {createStore} from "redux";
import rootReducer from 'reducers';
import routes from "../common/routes";
import "./index.less"

//通过reducers创建store
const store = createStore(rootReducer,
    window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
ReactDom.render(
    <Provider store={store}>
        {routes}
    </Provider>,
    document.getElementById("root")
);